1. Field of the Invention
The present invention relates to a method for decoding of MPEG-4 digital video having data-partitioned simple profile. In more detail, it relates to a method of constituting an MPEG-4 video decoder having a reasonable error resilience with low price by properly using error resistant algorithms provided by MPEG-4 under the circumstances in which irrecoverable errors can be added at transmission channel such as wireless transmission circumstances.
With this method, MPEG-4 error resilience tools are embodied as hardware without a large increase of design price or complexity. And thus, the quality of received video under wireless transmission circumstances can be maintained over a certain level.
2. Description of the Related Art
Since MPEG-4, which is designed to be able to transmit at an extremely low bit rate and completely standardized in 1999, is considered to be used under wireless transmission circumstances, it includes tools having resilience against irrecoverable errors possibly occurred at channels. These tools are mandatory options to be provided from simple profile.
MPEG-4 standard provides three error resistant algorithms as follows:
First, a resynchronization marker is used for impeding an error propagation during a bit stream decoding by placing a fixed length code, composed of a specific bit pattern, in a bit stream and thereby indicating a point, where decoding can be started correctly. A resynchronization marker is composed of a unique bit pattern inconsistent with any combination of variable length codes. With using the resynchronization markers, a frame is divided into several video packets(see FIG. 1), and thus even when an error is occurred in a video packet, next video packet can be decoded independently.
Second, data partition is a technology that improves the error resilience by rearranging the information transferring sequence in a video packet, and it is provided for better error concealment. If data partition is being applied, the important portion of a macroblock header information contained in a video packet is placed in the first half of the video packet and the rest is placed in the second half. And then, by inserting a specific bit pattern between the two parts, one can check the existence of error in the first-half information(See FIG. 2).
Third, reversible variable length encoding is a technology of localizing errors in a video packet. With this technology, if an error is detected in forward decoding, it seeks for the resynchronization marker of next video packet and decodes backward therefrom(See FIG. 3).
Annex E of MPEG-4 standard is based on error resistant algorithms described above and presents decoder behaviors for error correction as follows:    1. A general error detection includes the cases of: a bit stream, not listed on variable length code(VLC) table, being inputted; more than 64 discrete cosine transform(DCT) coefficients being decoded in a block; and an inconsistent resynchronization header information being inputted(For example, in case of a quantization coefficient being out of range or the macroblock address(MBA) of previous video packet(VP) being larger than that of current VP, and so on.).    2. In resynchronization algorithm, if an error is detected in a bit stream, a decoder seeks for the starting point of the following resynchronization(a video object plane(VOP) start code or a resynchronization marker). And then, it checks the error existence in VP using the bit pattern following the VP. At this time, if more than 8 of ‘1’ are existing consecutively at the end of a VP or the shape is different from “0111 . . . ”, it means that an error is contained in the VP. Here, missing blocks may be replaced with the same block from the previous frame.    3. A decoding method for reversible variable length codes with an RVLC algorithm, when an error is detected in a bit stream, is as follows:    3.1 Looking for the criterion for error detection in forward/backward decoding, the following cases are regarded to contain an error:            when a bit stream not listed on an RVLC table is found, and        when more than 64 DCT coefficients are decoded in a block.            3.2 A bit stream is first decoded in the forward direction in an RVLC decoding strategy. If no error is detected, it is assumed that the bit stream is valid and decoding for the VP is ended.
However, if an error is detected, two-way decoding is being applied. At this time, by using the following strategies, it can be decided that which bits shall be abandoned and which bits shall be used. Here, the following definitions are used:                L: number of total bits corresponding to DCT coefficient part in a VP.        N: number of total macroblocks in a VP.        L1: number of decodable bits before error detection in forward decoding.        L2: number of decodable bits before error detection in backward decoding.        N1: number of fully-decodable macroblocks in forward direction(0≦N1≦(N−1)).        N2: number of fully-decodable macroblocks in backward direction(0≦N2≦(N−1)).        f_mb(S): number of macroblocks decoded when S bit(s) can be decoded forwards. If one bit or more can be decoded in a macroblock, f_mb(S) is counted.        b_mb(S): number of macroblocks decoded when S bit(s) can be decoded backwards. If one bit or more can be decoded in a macroblock, b_mb(S) is counted.        T: 90.            (1) Strategy 1: When (L1+L2)<L and (N1+N2)<N;            Use first f_mb(L1−T) macroblocks and last b_mb(L2−T) macroblocks for decoding and abandon the rest, which is the portion indicated by oblique lines in FIG. 4.            (2) Strategy 2: When (L1+L2)<L and (N1+N2)≧N;            Use first (N−N2−1) macroblocks and last (N−N1−1) macroblocks for decoding and abandon the rest, which is the portion indicated by oblique lines in FIG. 5.            (3) Strategy 3: When (L1+L2)≧L and (N1+N2)<N;            Use first (N−b_mb(L2)) macroblocks and last (N−f_mb(L1)) macroblocks for decoding and abandon the rest, which is the portion indicated by oblique lines in FIG. 6.            (4) Strategy 4: When (L1+L2)≧L and (N1+N2)≧N;            Use first Min{N−b_mb(L2), N−N2−1} macroblocks and last Min{N−f_mb(L1), N−N1−1} macroblocks for decoding and abandon the rest, which is the portion indicated by oblique lines in FIG. 7. Here, Min{A, B} represents the minumum value of A and B.However, the prior art described above causes the following problems:            1) Since it starts decoding a VP as soon as a bit stream of the VP is inputted, it decodes the VP without knowing the number of macroblocks contained therein. And so, if it decodes a first part containing errors without acknowledging them, decoded length becomes different due to the errors, and as a result, errors are not detected and DC_MARKER or MOTION_MARKER may not be detected either.            Therefore, it occasionally decodes more bit stream than the actual length of a first part to detect an error in the first part header, and this causes decoding time increase.        Besides, since a DC_MARKER or a MOTION_MARKER is represented by the combination of VLCs used for a first part, if the number of macroblocks in VP is not known, a DC_MARKER or a MOTION_MARKER can not be properly used until their locations are detected with consuming extra time.            2) In case that an error is detected during a VP texture decoding, the decoded output up to the error-detected location becomes useless.            Therefore, in a channel with a comparably high bit error rate(BER) like a wireless transmission system, the immediate start of decoding a VP possibly causes decoding time increase.        In addition, in case that a VP decoding requires accesses to various internal/external memories in actual decoding circuit, it increases the overall power consumption.            3) In the RVLC decoding strategies described in FIG. 4˜FIG. 7, the meanings of f_mb(S) and b_mb(S) can not be directly used in an actual decoding system. This is because the bit length of each macroblock is different from one another, and thus, a process of reflecting each macroblock length into the symbols(f_mb(S) and b_mb(S)) is required. The present invention presents a method of carrying out this process simply.    4) Different from a first part of a data-partitioned VP, which is divided from a second part header by a DC_MARKER or a MOTION_MARKER, a second part header is connected to a second part texture with no division. Besides, a second part header is composed of general VLCs with which errors are not easily detected compared with RVLC, and thus errors are more possibly not detected.            Consequently, if errors in a second part header are not detected and decoding is carried out without noticing them, the video quality can be degraded. For example, in case that a DC coefficient error contained in a second part header of a P-VOP is not detected, the corresponding block may display a definitely different color from the surroundings.            5) It is very simple and easy just to substitute the macroblock to be error-concealed with a previous frame data for error concealment in a VP.            However, since a previous frame data is largely different from current frame data in a moving picture containing fast motions and/or frequent scene changes, an error-occurred portion may largely discord with the surroundings and the error concealment may become unsuccessful. Besides, the discordant portion may give a successive influence to the following frames.        